#include "photo.h"

struct FileSignatureType {
    const char *sinature;
    string type;
    MEDIA_TYPE mediaType;
};

PhotoConfig g_photoConfig;
list<PhotoFileIfo*> g_photoFileList;
FileSignatureType _fileSignature[] = {
    {"\xFF\xD8\xFF[\xFE\xE0\xE1\x00]+", "jpg", MEDIA_TYPE_IMAGE},
    {"\x89\x50\x4E\x47", "png", MEDIA_TYPE_IMAGE},
    {"\x42\x4D....\x00\x00\x00\x00", "bmp", MEDIA_TYPE_IMAGE},
    {"\x49\x49\x2A\x00", "tif", MEDIA_TYPE_IMAGE},
    {"\x12\x23\x34\x45", "avi", MEDIA_TYPE_VIDEO},
    {"\x52\x49\x46\x46....\x41\x56\x49", "avi", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x14\x66\x74\x79\x70\x71\x74\x20\x20", "mov", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x1C\x66\x74\x79\x70\x4D\x53\x4E\x56\x01\x29\x00\x46\x4D\x53\x4E\x56\x6D\x70\x34\x32", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x1C\x66\x74\x79\x70\x6D\x70\x34\x32", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x14\x66\x74\x79\x70\x6D\x70\x34\x32", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x14\x66\x74\x79\x70\x69\x73\x6F\x6D", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x1C\x66\x74\x79\x70\x69\x73\x6F\x6D", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x18\x66\x74\x79\x70\x69\x73\x6F\x6D", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x20\x66\x74\x79\x70\x69\x73\x6F\x6D", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x00\x18\x66\x74\x79\x70\x33\x67\x70", "mp4", MEDIA_TYPE_VIDEO},
    {"\x00\x00\x01[\xB0-\xBF]", "mpeg", MEDIA_TYPE_VIDEO},
};